package com.jxgyl.api;

import com.jxgyl.common.data.R;
import com.jxgyl.fallBack.RemoteTestFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/*
* 远程提供调用服务，直接注入接口名
* name:微服务名字
**/
@FeignClient(name = "platformtest",fallbackFactory = RemoteTestFallbackFactory.class)
public interface RemoteTestService {

    /**
     * 1、不要使用 @ReqeustMapping("/xxx")
     * 2、获取参数，需要指定@RequestParam("name")，类直接用json接受即可
     * 3、路径一定要写全
     */
    @PostMapping(value = "test2/gatewaytest")
    R<String> test(@RequestParam("name") String name);

}
